<script setup>

import {ref} from 'vue'
// import { userInfoService,updatePasswordService } from '@/api/admin.js'
import {useRouter} from 'vue-router'
import {ElMessage} from 'element-plus'

const router = useRouter();

const logout = async () => {
    await localStorage.removeItem('token')
    router.push({name: 'login'});

    ElMessage.success('退出成功')
}

//显当前时间(包括时分秒)




</script>

<template>
    <el-button @click="logout">退出登录</el-button>
    <ul>
        <li>
            <router-link className="router-link" to="/student">学生列表</router-link>
        </li>
        <li>
            <router-link className="router-link" to="/course">课程列表</router-link>
        </li>
        <li>
            <router-link className="router-link" to="/department">部门列表</router-link>
        </li>
        <li>
            <router-link className="router-link" to="/plan">计划列表</router-link>
        </li>
        <li>
            <router-link className="router-link" to="/score">成绩列表</router-link>
        </li>
    </ul>

    <el-header>
        <div>欢迎
        </div>

    </el-header>

    <el-main>
        <router-view></router-view>
    </el-main>

</template>

<style scoped>
.layout-container {
    height: 98vh;
}

.router-link {
    margin-right: 10px;
    text-decoration: none;
    color: #363b40;

}

li {
    list-style-type: none;
}

</style>